Computing systems often utilize processors, volatile memory, and non-volatile memory. The volatile memory provides temporary storage of instructions and data, while the non-volatile memory provides longer term, and sometimes permanent, storage. Volatile memory often provides temporary data storage for data read from, or written to, data storage devices. In many computing systems, the data storage devices are hard disk drives, solid state disks (SSDs), tape drives, or optical drives. In some cases, the data storage devices are organized into partitions and logical volumes, and can be accessed using Redundant Array of inexpensive disks (RAID) techniques.
In many computing systems, portions of the volatile memory are organized as caches. When a read cache is provided, the computing system stores frequently accessed read data in the cache memory so it can be read by a processor in much less time than reading from one or more storage devices. When a write cache is provided, the computing system stores new write data in the write cache. Once enough data to write one or more pages or stripes is present in the write cache, the computing system writes an entire page or stripe at the same time to the storage devices.
Computing systems often need to protect the write cache contents of a volatile memory, since the write data present is often a posted write. In a posted write, a host or other computer writes data to the computing system to store the data on one or more storage devices. The computing system temporarily stores the posted write data in the volatile memory, and sends a notification to the host or other computer that the posted write data has been written to the storage devices. From that point on, the writing application or operating system in the host or other computer assumes the posted write data has been successfully stored. However, in reality the posted write data in the computing system has not been stored to storage devices just yet.
A potential problem arises if main power to the computing system is lost between the time the computing system provides the notification to the host or other computer that the data has been written to the storage devices, and the time that all of the posted write data is finally written to the storage devices. Volatile memory devices do not retain memory contents if power to the volatile memory devices is lost. Therefore, if all of the writes described above are not properly completed by the time power is lost, at least some posted write data will be lost. This may result in an application crash, incorrect data stored, or other problems that must be avoided. System designers have long recognized this problem, and as a result have integrated backup power systems with the computing system. The backup power system generally provides a self-contained power source and associated circuitry that detects a main power failure, transfers posted write (and other important write data and parameters) from the volatile memory to a non-volatile memory. The non-volatile memory is usually, but not necessarily, a part of the computing system, and retains data contents whether or not power is present. When main power returns, the power circuitry detects this, transfers the posted write data from non-volatile memory to the volatile memory, and finally writes the posted write data from the volatile memory to the originally intended storage devices.
The backup power source must therefore have sufficient capacity to provide power to the volatile memory, the non-volatile memory, and any circuitry that saves (flushes) all of the posted write data to the non-volatile memory, in the absence of main power. Once all of the posted write data has been successfully flushed to the non-volatile memory, it is often acceptable for the backup power source to have minimal or no further energy capacity.